In a successive approximation type analog-to-digital conversion device, an offset error occurs with respect to a comparator comparing a reference voltage and an input voltage due to a configuration of the device. When the offset error is large, an overall error of the analog-to-digital conversion device becomes large. The offset error is corrected appropriately, thereby making it possible to make the overall error of the analog-to-digital conversion device small. When a microcontroller has the analog-to-digital conversion device mounted thereon to be used, the overall error becomes large due to variations in peripheral parts and a peripheral environment (temperature, voltage, and the like), in addition to manufacture variations in the analog-to-digital conversion device itself. The overall error is a parameter considered to be important in the field of motors, in particular, and it is also said that making this value as small as possible is needed in the market. Further, in the field of motors, it is necessary to perform a feedback of analog-to-digital conversion (and correction) to torque control processing to a motor in a cycle in which a system is determined, and it is also said that suppressing a load on a central processing unit (CPU) as much as possible is needed in the market.
There has been known an A/D conversion circuit that converts an analog signal to be measured into a digital signal and corrects an error of the conversion (see Patent Document 1, for example). The A/D conversion circuit, when a temperature change is detected in terms of temperature near an A/D converter to be measured by a temperature measurement circuit, searches a memory circuit for a correction value corresponding to the measured temperature, and when the correction value exists, uses the searched correction value for the succeeding error corrections.
Further, there has been known a data correcting method in an A/D conversion device that converts an input analog signal into a digital signal to output it (see Patent Document 2, for example). In the data correcting method, a correction value of a digital signal obtained after an analog signal is converted into a digital signal is obtained by a difference in value between a digital signal obtained by using a least-square method and an ideal digital signal provided beforehand. Then, based on this correction value, a gain/offset error and a non-linearity error are correction-operated.
Further, there has been known an A/D converter that reads a correction value based on an error between a converted value obtained by the A/D converter and a theoretical value from a non-volatile memory by a control circuit and outputs a value obtained by correcting the converted value by the read correction value as an A/D conversion result (see Patent Document 3, for example).
Patent Document 1: Japanese Laid-open Patent Publication No. 2005-244771
Patent Document 2: Japanese Laid-open Patent Publication No. 10-145231
Patent Document 3: Japanese Laid-open Patent Publication No. 11-88166
In order to make the overall error of the analog-to-digital conversion device small, a complex correction operation and a large-capacity memory are needed, and problems of a decrease in throughput and an increase in size of the analog-to-digital conversion device exist.